<?php

	/**
	 * File : signin.php
	 * Description : Page permettant à l'utilisateur de créer un compte
	 * Date : 07.08.2012 15:30:39
	 * 
	 * This file is part of Phenix.  Phenix is free software: you can
	 * redistribute it and/or modify it under the terms of the GNU General Public
	 * License as published by the Free Software Foundation, version 2.
	 *
	 * This program is distributed in the hope that it will be useful, but WITHOUT
	 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
	 * FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
	 * details.
	 *
	 * You should have received a copy of the GNU General Public License along with
	 * this program; if not, write to the Free Software Foundation, Inc., 51
	 * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
	 *
	 * Nils Schaetti <n.schaetti@gmail.com>
	**/

	// Includes
	require_once('core/libphenix.php');
	require_once('KTK/ktk.php');

	// Nouvel entête
	$header = new ktkHtmlHeader('KTK/css/style.css','','Phenix Web Grid Login');
	$header->addCSSFile('css/style.css');
	echo $header->getCode();

	// Get variables
	if(isset($_GET['error']))
		$error = $_GET['error'];
	else
		$error = false;

?>

<div id="index_header">
	<div><h2>Phenix Web Grid</h2>
	Grid simple as Web</div>
	<img src="images/phenix.png">
</div>

<center>
<!-- content -->
<div style="align-text: center; align: center; width: 720px;">
	<div class="frame_create_account_form">
		<h3>Create a Phenix account</h3><br>
		<form action="login.php" method="post">
			<b>Username</b> : <input type="text" name="username" class="input_text"><br>
			<b>Password</b> : <input type="password" name="password" class="input_text"><br>
			<b>Condor account</b><br>
			<select size="5">
				<option>schaetti@greedy.epfl.ch</option>
			</select><br>
			<input type="submit" name="btnAdd" value="Add" class="ktkRedButton"><br>
			<input type="submit" name="btnSubmit" value="Create" class="ktkBlueButton">
		</form>
		<?php
			if($error)
			{
				echo '
				<small><font color="red">Wrong username or password</font></small>
				<br/>';
			}
		?>
		<small>No account? <a href="">Create one</a></small><br>
		<small>Need a condor account? <a href="">Ask one!</a></small>
		<small>Lost your password? <a href="">Ask for a new one</a></small>
	</div>

	<div class="frame_create_account_text">

		<div class="frame_present_text">
			Simply choose a username and a password for your account. And
			add each Condor account and the server to create your new 
			Phenix account.<br>
		</div>

	</div>
</div>
</center>
<?php

	// HTML Footer
	lp_htmlFooter();

?>
